<?php

namespace app\console\controller;

use app\console\model\Admin as AdminModel;
use app\console\controller\Base;

/**
 * url验证
 * */
class Auth extends Base
{
    public function __construct()
    {
        parent::__construct();

        //url权限判断
        $http_url = str_to_line_lowers($this->request->controller()) . '/' . strtolower($this->request->action());
        if (AdminModel::check_user_url($http_url) == false) throw new \think\exception\HttpException(404);

    }
}
